home *** CD-ROM | disk | FTP | other *** search
/ Clickx 31 / Clickx 31.iso / assets / software / MyServer-win32-0.8.2.exe / web / documentation / texts / https.htm < prev    next >
Encoding:
Extensible Markup Language  |  2005-09-14  |  3.7 KB  |  95 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  3.   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  5. <head>
  6. <title>MyServer Documentation - HTTPS - www.myserverproject.net</title>
  7. <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  8. <meta http-equiv="Content-Style-Type" content="text/css" />
  9. <link rel="stylesheet" type="text/css" href="../style/myserver.css" />
  10. </head>
  11. <body>
  12.  
  13. <table class="center" width="95%">
  14.  
  15. <tr>
  16.  
  17. <td class="center">
  18.  
  19.  
  20. <h1 class="title">HTTPS</h1>
  21.  
  22.  
  23. <br />
  24. <h2 class="title">Brief notes on data encryption</h2>
  25. The data encryption is used to protect the data that is sent between the client and 
  26. the server. There are two types of algorithm: symmetric and asymmetric data 
  27. encryption algorithms. The difference between the two types of algorithm is 
  28. that for the symmetric algorithms the same key is used both for encryption and 
  29. decryption. These algorithms are not used by servers with a potentially large 
  30. number of clients because the data captured can be decrypted by any client 
  31. that know the key and because the key needs to be distribuite in a safe 
  32. manner(for example using a floppy disk) and not distributing it on a large 
  33. network like internet. The asymmetric algorithms work in a different way, 
  34. the data encrypted with a key can be decrypted only with the other key and 
  35. viceversa. Anyone know the public key but only the owner knows the private 
  36. one. In this way the key owner do not have to distribuite the key only to 
  37. know clients but he can distributes it to a large scale network. 
  38.  
  39. <br />
  40. <br />
  41. <h2 class="title">How create SSL certificates with OpenSSL </h2>
  42. A certificate is needed to certify your identity through a 
  43. CA(Certification Authority). You can use a certificate without register it to 
  44. third party CA but creating a Root Certification certificate. 
  45. You can find all the necessary to create certificates in the library 
  46. OpenSSL at: www.openssl.org. 
  47. After its installation go in the binaries directory and type: 
  48. <br />
  49. <span  class="code">
  50. openssl genrsa -out server.key 
  51. </span>
  52. <br />
  53. This will create a private key for encode your data. 
  54. <br />
  55. <br />
  56. After run this command: 
  57. <br />
  58. <span  class="code">
  59. openssl req -new -x509 -days 730 -config openssl.cnf -key server.key -out server.pem 
  60. </span>
  61. <br />
  62. to create the public certificate. In this way the certificate can be used for 
  63. 730 days and the public key will be the server.pem file. 
  64. <br />
  65. <br />
  66.  
  67. <h2 class="title">Use certificates in MyServer </h2>
  68. To configure certificates in MyServer you have to put the two files: server.key, 
  69. server.pem in the certificates folder under the MyServer installation path. 
  70. After this you have to configure an https virtual host in the virtualhosts.xml file. 
  71. <br />
  72. <span  class="code">
  73. <VHOST><br />
  74. <NAME>Every connection</NAME><br />
  75. <PORT>443</PORT><br />
  76. <SSL_PRIVATEKEY>certificates/server.key</SSL_PRIVATEKEY><br />
  77. <SSL_CERTIFICATE>certificates/server.pem</SSL_CERTIFICATE><br />
  78. <PROTOCOL>HTTPS</PROTOCOL><br />
  79. <DOCROOT>web</DOCROOT><br />
  80. <SYSFOLDER>system</SYSFOLDER><br />
  81. <ACCESSLOG>logs/myServer.log</ACCESSLOG><br />
  82. <WARNINGLOG>logs/myServer.err</WARNINGLOG><br />
  83. </VHOST><br />
  84. </span>
  85. <br />
  86. With this host we put an https listener on the port 443(the default one for HTTPS) 
  87. and we use the file certificates/server.key for the private key and the 
  88. certificates/server.pem file for the public one.
  89. </td>
  90. </tr>
  91. </table>
  92. </body>
  93. </html>
  94.  
  95.